package com.three.system.controller;


import com.three.core.entity.Menu;
import com.three.system.service.MenuService;
import com.three.core.vo.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/system/menu")
public class MenuController {
    @Autowired
    private MenuService menuService;
    @GetMapping("/getPermissionByUserId")
    public R<List<Menu>> getPermissionByUserId(@RequestParam Integer userId){
        return menuService.getByUserId(userId);
    }

    @GetMapping("/leftMenu")
    public R<List<Menu>> leftMenu(){
        return menuService.leftMenu();
    }
}
